<? require_once('include/connect.inc.php');
session_start();?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Modeltests Program</title>
<link href="design.css" rel="stylesheet" type="text/css" media="screen" />
</head>
<html>
<body>
<div>
    <div id="bg">
 
    <div id="p1">
   <div class="p11"><a href="person_tea.php"><img src="images/i7.png" border="0" /></a></div>
   <div  class="p11"><a href="tea_edit.php"><img src="images/i12.png" border="0" /></a></div>
   <div class="p11"><a href="insert_stu.php"><img src="images/i23.png" border="0" /></a></div>
   <div class="p11"><a href="agree_set.php"><img src="images/i24.png" border="0" /></a></div>
   <div class="p11"><a href="exam/show_subject.php"><img src="images/i19.png" border="0" /></a></div>
    <div class="p11"><a href="teacher_test.php"><img src="images/i18.png" border="0" /></a></div>
    <div class="p11"><a href="teacher_tests.php"><img src="images/i17.png" border="0" /></a></div>
    <div class="p11"><a href="exam/tea_chack.php"><img src="images/i25.png" border="0" /></a></div>
    <div class="p11"><a href="news/manage_news.php"><img src="images/i8.png" border="0" /></a></div>
     <div class="p11"><a href="problem/send_problem.php"><img src="images/i21.png" border="0" /></a></div>
    <div class="p11"><a href="logout.php"><img src="images/i6.png" border="0" /></a></div>
    </div>   
    
    <div id="p2">
    <div class="p21">
    <div>คุณ<?php echo"$teacher_name";?></div><hr />
	<li>แสดงคะแนนจากชุดข้อสอบ</li>
<form name="form1" method="post" action="">
 <table border="0"  id="table"  summary="2007 Major IT Companies Profit">
    <tr>
      <th align="center">ลำดับ</th>
      <th align="center">ชุดข้อสอบ</th>
       <th align="center">รายละเอียด</th>
       <th align="center">สร้างโดย</th>
       <th align="center">เมื่อวันที่</th>
       <th align="center">ลบ</th>
      <!-- <th align="center">แก้ไข</th>-->
    </tr>
    	<?
		$number==0;
		$query = query("SELECT * FROM tb_set_of_test
		Inner Join  tb_subject ON  tb_subject.subject_id = tb_set_of_test.subject_id 
		Inner Join  tb_topic ON  tb_topic.topic_id = tb_set_of_test.topic_id order by set_id desc");
			while ($rs = fetch_array($query)) {
				$set_id = $rs['set_id'];
				$set_date_cre = $rs['set_date_cre'];
				$subject_name = $rs['subject_name'];
				$topic_detail = $rs ['topic_detail'];
				$number++;
		?>
    <tr>
      <td align="center"><? echo "$number"; echo ".";?></td>
      <td><a href="frm_make_set.php?set_id=<? echo "$set_id"?> "><? echo "$set_id"?></a></td>
      <td>ข้อสอบวิชา(<? echo "$subject_name";?>) - หัวข้อ: <? echo "$topic_detail";?></td>
      <td><? echo "$teacher_name";?></td>
      <td><? echo "$set_date_cre";?></td>
      <td align="center"><a href="frm_del_set.php?del_id=<?php echo $set_id;?>" onclick="return confirm('ยืนยันการลบข้อสอบ')"><img src="images/s.png" alt="" border="0" /></a></td>
      <?php /*?><td align="center"><a href="frm_del_edit.php?set_id=<?php $set_id;?>"><img src="../images/edit.png" border="0" /></a></td><?php */?>
    </tr>
      <? }?>
  </table>
</form>
</div>
</div>
</div>
</div>
</body>
</html>